/* ============ 线性进度条 ============ */

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: var(--bg-light);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.progress-bar.progress-success .progress-fill {
    background: #52c41a;
}

.progress-bar.progress-warning .progress-fill {
    background: #faad14;
}

.progress-bar.progress-error .progress-fill {
    background: #f5222d;
}

.progress-bar.progress-animated .progress-fill {
    animation: progress-animation 2s ease-in-out infinite;
}

@keyframes progress-animation {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

.progress-text {
    min-width: 40px;
    text-align: right;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ============ 圆形进度条 ============ */

.progress-circle-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 120px;
    height: 120px;
}

.progress-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-circle-bg {
    fill: none;
    stroke: var(--bg-light);
    stroke-width: 6;
}

.progress-circle-fill {
    fill: none;
    stroke: var(--primary-color);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.3s ease;
}

.progress-circle.progress-success .progress-circle-fill {
    stroke: #52c41a;
}

.progress-circle.progress-warning .progress-circle-fill {
    stroke: #faad14;
}

.progress-circle.progress-error .progress-circle-fill {
    stroke: #f5222d;
}

.progress-circle-text {
    position: absolute;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

/* ============ 步骤条 ============ */

.steps-wrapper {
    display: flex;
    gap: 0;
}

.steps-wrapper.steps-horizontal {
    flex-direction: row;
}

.steps-wrapper.steps-vertical {
    flex-direction: column;
}

.step-item {
    flex: 1;
    display: flex;
    gap: 12px;
    position: relative;
}

.steps-horizontal .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 50%;
    height: 2px;
    background: var(--border-color);
}

.steps-horizontal .step-item.step-finish:not(:last-child)::after {
    background: var(--primary-color);
}

.steps-vertical .step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    left: 20px;
    width: 2px;
    height: calc(100% - 40px);
    background: var(--border-color);
}

.steps-vertical .step-item.step-finish:not(:last-child)::after {
    background: var(--primary-color);
}

.step-head {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.step-item.step-finish .step-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step-item.step-process .step-icon {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.step-item.step-error .step-icon {
    background: #f5222d;
    border-color: #f5222d;
    color: white;
}

.step-item.step-wait .step-icon {
    cursor: pointer;
}

.step-item.step-wait .step-icon:hover {
    border-color: var(--primary-color);
}

.step-loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: step-loading-spin 1s linear infinite;
}

@keyframes step-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.step-content {
    flex: 1;
    padding-top: 4px;
}

.step-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.step-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* ============ 响应式 ============ */

@media (max-width: 768px) {
    .progress-wrapper {
        gap: 8px;
    }

    .progress-text {
        min-width: 35px;
        font-size: 12px;
    }

    .step-item {
        gap: 8px;
    }

    .step-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .step-title {
        font-size: 13px;
    }

    .step-description {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .steps-wrapper.steps-horizontal {
        flex-direction: column;
    }

    .steps-horizontal .step-item:not(:last-child)::after {
        display: none;
    }

    .steps-horizontal .step-item {
        margin-bottom: 16px;
    }

    .progress-circle-wrapper {
        width: 100px;
        height: 100px;
    }

    .progress-circle-text {
        font-size: 14px;
    }
}
